 var topList =["day","week","month"];
        function topInfoHTML(data){
            var resultData = data.resultData;
            var html="";
            for(var i = 0 ; i < resultData.length ; i++){
        		html +="<dl><dt><a target=\"_blank\" href=\"http://zone.17guagua.com/"+resultData[i].userId+"\" ><img src=\"http://zone1.ggimg.cn/custom/portrait/"+resultData[i].userId+"_small.jpg\" name=\"infocard"+resultData[i].userId+"\" width=\"32\" height=\"32\"></a></dt><dd><p><a  target=\"_blank\" href=\"http://zone.17guagua.com/"+resultData[i].userId+"\" \>"+resultData[i].nickname+"</a></p> <div><var id=\"user_levelIcon_"+resultData[i].userId+"\" class=\"levelIcon\"></var></div></dd></dl>";
            }
            return html;
        }
    	function topQueryAjax(type,allottedTime){
    	       if($("#"+type+"_"+allottedTime).attr("isLoaded") == "true"){
    	    	   for(var i = 0 ; i < topList.length ; i++){
		    	       	$("#t_"+type+"_"+topList[i]).removeClass("iconA");
		    	       	$("#"+type+"_"+topList[i]).hide();
		    	   }
    	    	   
    	       		 $("#t_"+type+"_"+allottedTime).addClass("iconA");
    		         $("#"+type+"_"+allottedTime).show();
    	       		return ;
    	       }
    	       
    	
    	
    		   var url ="/top!queryTop5.jspa";
    		   var roomId = $("#top_roomid").val();
    		   var jsonData ={roomId:roomId,type:type,allottedTime:allottedTime};
    		    $.ajax({
	           cache:false,
			   type: "POST",
			   url: url,
			   data: jsonData,
			   dataType:"json",
			   success: function(data){
				 
				   for(var i = 0 ; i < topList.length ; i++){
		    	       	$("#t_"+type+"_"+topList[i]).removeClass("iconA");
		    	       	$("#"+type+"_"+topList[i]).hide();
		    	   }
				   
				   
			      $("#t_"+data.type+"_"+data.allottedTime).addClass("iconA");
    		      $("#"+data.type+"_"+data.allottedTime).html(topInfoHTML(data));
    		      $("#"+data.type+"_"+data.allottedTime).show();
    		      $("#"+data.type+"_"+data.allottedTime).attr("isLoaded","true");
    		      initLevelIcon();
			   }
		      });  
    	}